package panels;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.Font;
import javax.swing.SwingConstants;
import java.awt.Color;
import javax.swing.SpringLayout;

public class About extends JDialog {

	private final JPanel contentPanel = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			About dialog = new About();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public About() {
		setBounds(100, 100, 363, 333);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBackground(Color.WHITE);
		contentPanel.setBorder(null);
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		SpringLayout sl_contentPanel = new SpringLayout();
		contentPanel.setLayout(sl_contentPanel);
		
		JLabel lblNewLabel = new JLabel("New label");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblNewLabel, 11, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblNewLabel, 0, SpringLayout.WEST, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.SOUTH, lblNewLabel, -11, SpringLayout.SOUTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblNewLabel, 83, SpringLayout.WEST, contentPanel);
		lblNewLabel.setIcon(new ImageIcon(About.class.getResource("/img/plyta.png")));
		contentPanel.add(lblNewLabel);
		
		JLabel lblMusicStore = new JLabel("MUSIC STORE");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblMusicStore, 10, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblMusicStore, 6, SpringLayout.EAST, lblNewLabel);
		sl_contentPanel.putConstraint(SpringLayout.SOUTH, lblMusicStore, 50, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblMusicStore, 303, SpringLayout.WEST, contentPanel);
		lblMusicStore.setHorizontalAlignment(SwingConstants.CENTER);
		lblMusicStore.setFont(new Font("Tahoma", Font.BOLD, 24));
		contentPanel.add(lblMusicStore);
		
		JLabel lblWersja = new JLabel("Wersja 1.0");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblWersja, 61, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblWersja, -8, SpringLayout.WEST, lblMusicStore);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblWersja, 311, SpringLayout.WEST, contentPanel);
		lblWersja.setFont(new Font("Tahoma", Font.BOLD, 11));
		lblWersja.setHorizontalAlignment(SwingConstants.CENTER);
		contentPanel.add(lblWersja);
		
		JLabel lblCopyrightc = new JLabel("Copyright (C) by 2013");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblCopyrightc, 96, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblCopyrightc, -4, SpringLayout.WEST, lblMusicStore);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblCopyrightc, 308, SpringLayout.WEST, contentPanel);
		lblCopyrightc.setHorizontalAlignment(SwingConstants.CENTER);
		contentPanel.add(lblCopyrightc);
		
		JLabel lblChyaDorota = new JLabel("Chyła Dorota");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblChyaDorota, 121, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblChyaDorota, -7, SpringLayout.WEST, lblMusicStore);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblChyaDorota, 310, SpringLayout.WEST, contentPanel);
		lblChyaDorota.setHorizontalAlignment(SwingConstants.CENTER);
		contentPanel.add(lblChyaDorota);
		
		JLabel lblBednarskiTomasz = new JLabel("Bednarski Tomasz");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblBednarskiTomasz, 146, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblBednarskiTomasz, -5, SpringLayout.WEST, lblMusicStore);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblBednarskiTomasz, 309, SpringLayout.WEST, contentPanel);
		lblBednarskiTomasz.setHorizontalAlignment(SwingConstants.CENTER);
		contentPanel.add(lblBednarskiTomasz);
		
		JLabel lblFlorkowskiWojciech = new JLabel("Florkowski Wojciech");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblFlorkowskiWojciech, 171, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblFlorkowskiWojciech, -5, SpringLayout.WEST, lblMusicStore);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblFlorkowskiWojciech, 309, SpringLayout.WEST, contentPanel);
		lblFlorkowskiWojciech.setHorizontalAlignment(SwingConstants.CENTER);
		contentPanel.add(lblFlorkowskiWojciech);
		
		JLabel lblGsiewiczukasz = new JLabel("Gąsiewicz Łukasz");
		sl_contentPanel.putConstraint(SpringLayout.NORTH, lblGsiewiczukasz, 196, SpringLayout.NORTH, contentPanel);
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblGsiewiczukasz, -5, SpringLayout.WEST, lblMusicStore);
		sl_contentPanel.putConstraint(SpringLayout.EAST, lblGsiewiczukasz, 309, SpringLayout.WEST, contentPanel);
		lblGsiewiczukasz.setHorizontalAlignment(SwingConstants.CENTER);
		contentPanel.add(lblGsiewiczukasz);
		
		JLabel lblNewLabel_1 = new JLabel("Politechnika Koszalińska - WEiI");
		sl_contentPanel.putConstraint(SpringLayout.WEST, lblNewLabel_1, 6, SpringLayout.EAST, lblNewLabel);
		sl_contentPanel.putConstraint(SpringLayout.SOUTH, lblNewLabel_1, -10, SpringLayout.SOUTH, contentPanel);
		contentPanel.add(lblNewLabel_1);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setBackground(Color.WHITE);
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
		}
	}
}
